package e2q.security.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * E2qSmSystemMenu entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "e2q_sm_system_menu")
public class E2qSmSystemMenu extends e2q.web.orm.Persistent implements
		java.io.Serializable {

	// Fields

	private Long id;
	private E2qSmSystemMenu e2qSmSystemMenu;
	private E2qSmAccessResource e2qSmAccessResource;
	private Integer smenIndex;
	private String smenCaption;
	private String smenIcon;
	private String smenHint;
	private String actionname;
	@Transient
	public String getActionname() {
		return actionname;
	}
	@Transient
	public void setActionname(String actionname) {
		this.actionname = actionname;
	}
	// Property accessors
	@Override
	public String toString() {
		return id.toString();
	}
	@Id
	@GeneratedValue(generator = "pk")
	@Column(name = "smenId")
	@GenericGenerator(name = "pk", strategy = "e2q.web.orm.IdGenerator")
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "smenParentId")
	public E2qSmSystemMenu getE2qSmSystemMenu() {
		return this.e2qSmSystemMenu;
	}

	public void setE2qSmSystemMenu(E2qSmSystemMenu e2qSmSystemMenu) {
		this.e2qSmSystemMenu = e2qSmSystemMenu;
	}

	@ManyToOne
	@JoinColumn(name = "smenReourceId", nullable = false)
	public E2qSmAccessResource getE2qSmAccessResource() {
		return this.e2qSmAccessResource;
	}

	public void setE2qSmAccessResource(E2qSmAccessResource e2qSmAccessResource) {
		this.e2qSmAccessResource = e2qSmAccessResource;
	}

	@Column(name = "smenIndex", nullable = false)
	public Integer getSmenIndex() {
		return this.smenIndex;
	}

	public void setSmenIndex(Integer smenIndex) {
		this.smenIndex = smenIndex;
	}

	@Column(name = "smenCaption", nullable = false)
	public String getSmenCaption() {
		return this.smenCaption;
	}

	public void setSmenCaption(String smenCaption) {
		this.smenCaption = smenCaption;
	}

	@Column(name = "smenIcon")
	public String getSmenIcon() {
		return this.smenIcon;
	}

	public void setSmenIcon(String smenIcon) {
		this.smenIcon = smenIcon;
	}

	@Column(name = "smenHint")
	public String getSmenHint() {
		return this.smenHint;
	}

	public void setSmenHint(String smenHint) {
		this.smenHint = smenHint;
	}
}